<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改药剂配方')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-formula-edit" th:object="${fantasyChemistFormula}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">材料1：</label>
                <div class="col-sm-8">
                    <select id="factor1" name="factor1" class="form-control">
                        <option value="">请选择</option>
                        <option th:each="itemType:${itemTypes}" th:alt-title="${itemType.name}" th:value="${itemType.id}" th:text="${itemType.name}" th:selected="${fantasyChemistFormula.factor1 == itemType.id}" value="1">
                            aaa
                        </option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">材料2：</label>
                <div class="col-sm-8">
                    <select id="factor2" name="factor2" class="form-control">
                        <option value="">请选择</option>
                        <option th:each="itemType:${itemTypes}" th:alt-title="${itemType.name}" th:value="${itemType.id}" th:text="${itemType.name}" th:selected="${fantasyChemistFormula.factor2 == itemType.id}" value="1">
                            aaa
                        </option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">产出1：</label>
                <div class="col-sm-8">
                    <select id="result1" name="result1" class="form-control">
                        <option value="">请选择</option>
                        <option th:each="itemType:${itemTypes}" th:alt-title="${itemType.name}" th:value="${itemType.id}" th:text="${itemType.name}" th:selected="${fantasyChemistFormula.result1 == itemType.id}" value="1">
                            aaa
                        </option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">产出2：</label>
                <div class="col-sm-8">
                    <select id="result2" name="result2" class="form-control">
                        <option value="">请选择</option>
                        <option th:each="itemType:${itemTypes}" th:alt-title="${itemType.name}" th:value="${itemType.id}" th:text="${itemType.name}" th:selected="${fantasyChemistFormula.result2 == itemType.id}" value="1">
                            aaa
                        </option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">产出3：</label>
                <div class="col-sm-8">
                    <select id="result3" name="result3" class="form-control">
                        <option value="">请选择</option>
                        <option th:each="itemType:${itemTypes}" th:alt-title="${itemType.name}" th:value="${itemType.id}" th:text="${itemType.name}" th:selected="${fantasyChemistFormula.result3 == itemType.id}" value="1">
                            aaa
                        </option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "fantasy/formula";
        $("#form-formula-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-formula-edit').serialize());
            }
        }
    </script>
</body>
</html>